home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 13 / MacFormat n. 13 (Spain) / Macformat 13.bin / Shareware Internet / Desarrolladores / FFTs for RISC 1.0 / rffttest.m < prev    next >
Encoding:
Text File  |  1995-12-19  |  243 b   |  17 lines

  1. N=32;
  2. j=sqrt(-1);
  3. a=ones(N,1);
  4. row=0;
  5. for i1=1:2:N;
  6.     a(i1) = sqrt(row+i1-1+.77777);    
  7.     a(i1+1) = (row+i1-1+.22222)*(row+i1-1+.22222) / N - N/2;    
  8. end;
  9. a(1)=N+3;
  10. a(3)=1-N;
  11. A=fft(a);
  12. A=A(1:N/2);
  13. if N<=32
  14.     A
  15. end
  16. max(abs(A-atrans)./(max(abs(A))/N))
  17.